<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	
	
	<script src="jquery-2.1.1.min.js"></script>
	<script src="jquery-migrate-1.2.1.js"></script>
	
	<script type="text/javascript">
		function sendData(){
				$.ajax({    
		         type : "post",    
		         async:false,    
		         url : "http://127.0.0.1:8080/ssm/remoteData/test.do",
		         dataType:"jsonp", 
		         jsonp:"callback",
				 data: {
				 //companyNameId:encodeURI(companyNameId),
				 //contactId:encodeURI(contactId),
				 //emailId:encodeURI(emailId),
				 //nameId:encodeURI(nameId),
				 //sex:encodeURI(sex),
				 //cityId:encodeURI(cityId),
				 //descId:encodeURI(descId),
				 t:(new Date()).valueOf()
				 }, 
		         success:function(res){    
		         
				  	if(res.result=="00"){
						
						alert("回复内容："+res.name);
						
						
					}
				   
		         },    
		         error:function(){ 
					alert("提交失败");
		         }    
		     });   
		}
	
	</script>
	
	
	
  </head>
  
  <body>
    <a href="book/showbook.do">图书修改</a>
    <a href="book/search.do">查询图书</a>
    <input type='button' value="测试" onclick="sendData()"/>
    
  </body>
</html>
